package com.artron.mediaartron.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-11-14.
 */

public class MaterialWithDate implements Parcelable {

    private String uploadDate;

    private boolean isShowAll;

    private boolean isCheckAll;

    private List<MaterialData.MaterialListBean> contentData;

    public String getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(String uploadDate) {
        this.uploadDate = uploadDate;
    }

    public List<MaterialData.MaterialListBean> getContentData() {
        return contentData;
    }

    public void setContentData(List<MaterialData.MaterialListBean> contentData) {
        this.contentData = contentData;
    }

    public boolean isShowAll() {
        return isShowAll;
    }

    public void setShowAll(boolean showAll) {
        isShowAll = showAll;
    }


    public boolean isCheckAll() {
        return isCheckAll;
    }

    public void setCheckAll(boolean checkAll) {
        isCheckAll = checkAll;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.uploadDate);
        dest.writeByte(this.isShowAll ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isCheckAll ? (byte) 1 : (byte) 0);
        dest.writeList(this.contentData);
    }

    public MaterialWithDate() {
    }

    protected MaterialWithDate(Parcel in) {
        this.uploadDate = in.readString();
        this.isShowAll = in.readByte() != 0;
        this.isCheckAll = in.readByte() != 0;
        this.contentData = new ArrayList<MaterialData.MaterialListBean>();
        in.readList(this.contentData, MaterialData.MaterialListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<MaterialWithDate> CREATOR = new Parcelable.Creator<MaterialWithDate>() {
        @Override
        public MaterialWithDate createFromParcel(Parcel source) {
            return new MaterialWithDate(source);
        }

        @Override
        public MaterialWithDate[] newArray(int size) {
            return new MaterialWithDate[size];
        }
    };
}
